package com.lkm.market2_0.m.steelyardserver;

import android.os.Handler;

import com.lkm.frame.otto.LinkBus;
import com.lkm.frame.otto.LinkBusEventFlag;
import com.lkm.frame.otto.ThreadEnforcer;
import com.lkm.market2_0.ExpandConfig;



public class OnSteelyardKeyEvent implements LinkBusEventFlag {

    public static void sendKey(int keyCode, Handler mainHandler){
        LinkBus.sendBroadcast(new OnSteelyardKeyEvent(ExpandConfig.instance.interceptKeyCode(keyCode)),null,true,mainHandler);
    }

    public static final int KEYCODE_0 = 0;
    public static final int KEYCODE_1 = 1;
    public static final int KEYCODE_2 = 2;
    public static final int KEYCODE_3 = 3;
    public static final int KEYCODE_4 = 4;
    public static final int KEYCODE_5 = 5;
    public static final int KEYCODE_6 = 6;
    public static final int KEYCODE_7 = 7;
    public static final int KEYCODE_8 = 8;
    public static final int KEYCODE_9 = 9;

    public static final int KEYCODE_DOT = 10;
    public static final int KEYCODE_PAY = 11;
    public static final int KEYCODE_FUN = 12;
    public static final int KEYCODE_CLEAR = 13;

    
    public static final int KEYCODE_CLEAR_PRICE  = 14;
    
    public static final int KEYCODE_QUPI = 15;

    
    public static final int KEYCODE_LEIJI = 16;
    
    public static final int KEYCODE_GOODTIQU = 17;

    
    public static final int KEYCODE_GOODQIEH = 18;

    
    public static final int KEYCODE_INPUT_PRICE = 19;



    @Deprecated
    public static final int KEYCODE_Money = 0x18;//24

    public static final int KEYCODE_VipW = 0x19;//25
    public static final int KEYCODE_VipCard = 0x1a;//26

    public static final int KEYCODE_DelegatePay = 0x1b;//27
    public static final int KEYCODE_SyncBtn = 2002;
    public static final int KEYCODE_ClearAndColse = 2003;




    public static final int KEYCODE_FJ = 2000;


    public static final int KEYCODE_Fjswitch = 2001;




    private final int extKeyCode;
    
    private volatile boolean isIntercepted;

    public OnSteelyardKeyEvent(int extKeyCode) {
        this.extKeyCode = extKeyCode;
    }

    public int getKeyCode() {
        return extKeyCode;
    }

    public boolean isIntercepted() {
        return isIntercepted;
    }

    public void setIntercepted(boolean intercepted) {
        isIntercepted = intercepted;
    }

    @Override
    public ThreadEnforcer getThreadEnforcer() {
        return ThreadEnforcer.ANY;
    }

    @Override
    public boolean isStickyBroadcast() {
        return false;
    }
}
